import request from "@/utils/request"

export const portList = (search) =>
    request({
        url: "/portAll",
        method: 'get',
        params: {
            portName: search.portname,
            offset: search.offset,
            limit: search.limit
        }
    })

export const deleteSport = (id) =>
    request({
        url: "/deleSport" + id,
        method: "delete"
    })

export const addSport = (sport) =>
    request({
        url: "/addSport",
        method: "post",
        data: sport
    })

export const sportBefore = (id) =>
    request({
        url: "/beforeUpdateByid" + id,
        method: "post"
    })

export const sportUpdate = (sport) =>
    request({
        url: "/updateSportByid",
        method: "put",
        data: sport
    })

export const findSportListName = () =>
    request({
        url:'/selectSportNameList',
        method:"get"
    })